/*
 * @Author: DUST
 * @Date: 2023-05-16 11:34:17
 * @LastEditors: DUST
 * @LastEditTime: 2023-05-16 11:43:42
 * @FilePath: \vite-project\src\router\routeUtils.ts
 * @Description: 
 * undefined
 */

import { RawRouteComponent, RouteMenuInterface } from "@/interface";

export const MakeBaseRoute = (component: RawRouteComponent, name: string, title: string, pPath: string, routes: RouteMenuInterface[]): any => {
  // console.log("进来的路由：", routes);
  return {
    path: pPath,
    name: name,
    component: component,
    redirect: routes[0].path,
    meta: {
      key: name,
      title: title,
    },
    children: routes
  };
};